﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LastFmDemo
{
    public partial class TrackItem : UserControl
    {
        MainForm _mf;
        int _Index;

        public int Index
        {
            get { return _Index; }
            set { _Index = value; }
        }
        String _TrackName;

        public String TrackName
        {
            get { return _TrackName; }
            set 
            { 
                _TrackName = value;
                lbTrackName.Text = value;
            }
        }
        String _Artist;

        public String Artist
        {
            get { return _Artist; }
            set
            {
                _Artist = value;
                lbArtist.Text = value;
            }
        }
        public TrackItem()
        {
            InitializeComponent();
        }
        public TrackItem(String trackName, String artist,int idx, MainForm mform)
        {
            InitializeComponent();
            Artist = artist;
            TrackName = trackName;
            _mf = mform;
            Index = idx;
        }

        private void TrackItem_Click(object sender, EventArgs e)
        {
            _mf.ShowDetail(0, Index);
        }
    }
}
